{include file="public_iframe:head"}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>会员编辑</h5>
            <div class="ibox-tools" style="margin-top: -9px;">
                <a href="javascript:history.go(-1);" class="btn btn-primary"><i class="fa fa-arrow-left"></i> 返回</a>
            </div>
        </div>
        <div class="ibox-content">
            <form action="" method="post" enctype="multipart/form-data" id="brandForm" class="form-horizontal">
                <input type="hidden" name="id" value="{$da.id}">
                <div class="form-group">
                    <label class="col-sm-2 control-label">昵称</label>
                    <div class="col-sm-6">
                        <input type="text" name="nickname" id="nickname" value="{$da.nickname}" class="form-control" placeholder="昵称" disabled>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">性别</label>
                    <div class="col-sm-6">
                        <label class="checkbox-inline">
                            <input type="radio" name="sex"  value="1"  {if condition="$da.sex=='1'"}checked="checked"{/if}>男
                        </label>
                        <label class="checkbox-inline">
                            <input type="radio" name="sex"  value="2"  {if condition="$da.sex=='2'"} checked="checked"{/if}>女
                        </label>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">电话号码</label>
                    <div class="col-sm-6">
                        <input type="text" name="mobile" id="mobile" value="{$da.mobile}" class="form-control" placeholder="电话号码" disabled>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">邮箱</label>
                    <div class="col-sm-6">
                        <input type="text" name="email" id="email" value="{$da.email}" class="form-control" placeholder="邮箱"  disabled>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">地址</label>
                    <div class="col-sm-6">
                        <input type="text" name="province" id="province" value="{$da.province}" class="form-control" placeholder="省"disabled>
                        <input type="text" name="city" id="city" value="{$da.city}" class="form-control" placeholder="市" disabled>
                        <input type="text" name="county" id="county" value="{$da.county}" class="form-control" placeholder="区" disabled>
                        <input type="text" name="address" id="address" value="{$da.address}" class="form-control" placeholder="地址" disabled>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">注册时间</label>
                    <div class="col-sm-6">
                        <input type="text" name="create_time" id="create_time" value="{$da.create_time|date="Y-m-d H:i:s",###}" class="form-control" disabled>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <!--<div class="form-group">-->
                    <!--<label class="col-sm-2 control-label">零钱</label>-->
                    <!--<div class="col-sm-2">-->
                        <!--<input type="text"  value="{$da.balance}" class="form-control" placeholder="零钱"  disabled>-->
                    <!--</div>-->
                    <!--<div class="col-sm-2">-->
                        <!--<input type="text" name="balance" id="balance" value="" class="form-control" placeholder="充值金额" >-->
                    <!--</div>-->
                    <!--<div class="col-sm-2">-->
                        <!--<a href="JavaScript:void(0);" onclick="Submit();" class="btn btn-primary" id="submit">充值</a>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="hr-line-dashed"></div>-->
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <!--<button class="btn btn-primary" type="submit">提交</button>-->
                        <!--href="JavaScript:void(0);" onclick="roleSubmit();"-->
                        <!--<a href="JavaScript:void(0);" onclick="Submit();" class="btn btn-primary" id="submit">提交</a>-->
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!-- End Panel Basic -->
</div>
<script type="text/javascript" src="__STATIC__/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '#time' //指定元素
        ,type:'datetime'
    });
    function Submit(){
//        if($('#nickname').val() == ''){
//            parent.layer.msg('昵称不能为空！',{
//                shade:false,
//                icon:1,
//                time:1000
//            });
//            return false;
//        }

        var id = $('input[name="id"]').val();
        var balance = $('input[name="balance"]').val();

        $.post("{:url('Member/detail')}",{
            id:id, balance:balance
        },function(result){
            if(result.code == '0'){
                parent.layer.alert(result.msg);
            }else{
                parent.layer.msg(result.msg,{
                            icon:1,
                            time:1000,
                        },
                        function (index, item) {
                            location.href = result.url;
                        });
            }
        });

    };
</script>

</body>

</html>